Request for feature: pg_dump schema masquerade flag
| От | Owen Hartnett |
|---|---|
| Тема | Request for feature: pg_dump schema masquerade flag |
| Дата | |
| Msg-id | p06230905c322b0b1ce56@[192.168.0.109] обсуждение исходный текст |
| Ответ на | Re: question about pg_dump -a (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | pgsql-general |
I don't think this would be too hard to effect: When pg_dumping a schema, have an additional flag -m <newschemaname>, that would convert all references in the dump from the original schema to the new schema name. Thus the command: pg_dump -c -s myoldschemaname -m mynewschemaname mydatabase -f foo would generate a dump file such that all the data that was in myoldschemaname would, upon psql mydatabase < foo would be in a new (or replaced) schema mynewschemaname. The present strategy is to go through the dump and manually change the schema names in the dump text. This is not a reliable mechanism, as there may be name collisions with the schema name and other names, and there's always the possibility that you might miss one when you're hand modifying the code. I'd be happy to help on the effort if that makes sense. I don't know what the code to pg_dump is like, though. -Owen
В списке pgsql-general по дате отправления: